package com.shexianyu.notes.web.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Table;
import javax.persistence.Id;

import java.time.LocalDateTime;

import static javax.persistence.GenerationType.IDENTITY;

@ApiModel(description = "user实体类")
@Data
@Entity
@Table(name = "sys_user")
public class SysUser {
    @ApiModelProperty(value = "主键ID")
    @Id
    @GeneratedValue(strategy = IDENTITY)
    private Integer id;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "账号")
    private String account;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "登陆凭证")
    private String token;

    @ApiModelProperty(value = "登录时间")
    private LocalDateTime loginTime;

    @ApiModelProperty(value = "过期时间")
    private LocalDateTime expireTime;

}
